<?php
$routerGroup = new \Phalcon\Mvc\Router\Group(['module' => 'frontend']);

$routerGroup -> addPost('/user/wallet/appointment/transfer', ['controller'=>'UserWalletAppointment','action'=>'transfer']) -> setName('FrontendUserWalletAppointment::transfer');

$routerGroup -> addGet('/user/mutually/buy/findFirst/:int/token', ['controller'=>'UserMutuallyBuy','action'=>'findFirstByIdAndToken','id'=>1]) -> setName('BackendUserMutuallyBuy::findFirstByIdAndToken');
$routerGroup -> addGet('/user/mutually/buy/pager/token', ['controller'=>'UserMutuallyBuy','action'=>'pagerByToken']) -> setName('BackendUserMutuallyBuy::pagerByToken');
$routerGroup -> addPost('/user/mutually/buy/token', ['controller'=>'UserMutuallyBuy','action'=>'createByToken']) -> setName('FrontendUserMutuallyBuy::createByToken');

$routerGroup -> addPatch('/user/mutually/buy/:int/update/status/:int/token', ['controller'=>'UserMutuallyBuy','action'=>'updateStatusByToken','id'=>1,'status'=>2]) -> setName('FrontendUserMutuallyBuy::updateStatusByToken');
$routerGroup -> addPatch('/user/mutually/buy/:int/update/resetMatch/token', ['controller'=>'UserMutuallyBuy','action'=>'updateResetMatchByToken','id'=>1]) -> setName('FrontendUserMutuallyBuy::updateResetMatchByToken');

$routerGroup -> addPatch('/user/mutually/sell/:int/update/status/:int/token', ['controller'=>'UserMutuallySell','action'=>'updateStatusByToken','id'=>1,'status'=>2]) -> setName('FrontendUserMutuallySell::updateStatusByToken');
$routerGroup -> addGet('/user/mutually/sell/findFirst/:int/token', ['controller'=>'UserMutuallySell','action'=>'findFirstByIdAndToken','id'=>1]) -> setName('BackendUserMutuallySell::findFirstByIdAndToken');
$routerGroup -> addGet('/user/mutually/sell/pager/token', ['controller'=>'UserMutuallySell','action'=>'pagerByToken']) -> setName('BackendUserMutuallySell::pagerByToken');
$routerGroup -> addPost('/user/mutually/sell/token', ['controller'=>'UserMutuallySell','action'=>'createByToken']) -> setName('FrontendUserMutuallySell::createByToken');

$routerGroup -> addPost('/user/login', ['controller'=>'User','action'=>'login']) -> setName('FrontendUser::login');
$routerGroup -> addPatch('/user/updateLoginPasswordByToken', ['controller'=>'User','action'=>'updateLoginPasswordByToken']) -> setName('FrontendUser::updateLoginPasswordByToken');
$routerGroup -> addPatch('/user/updateSafePasswordByToken', ['controller'=>'User','action'=>'updateSafePasswordByToken']) -> setName('FrontendUser::updateSafePasswordByToken');
$routerGroup -> addGet('/user/account', ['controller'=>'User','action'=>'findFirstByAccount']) -> setName('FrontendUser::findFirstByAccount');
$routerGroup -> addGet('/user/token', ['controller'=>'User','action'=>'findFirstByToken']) -> setName('FrontendUser::findFirstByToken');
$routerGroup -> addPost('/user', ['controller'=>'User','action'=>'create']) -> setName('FrontendUser::create');

$routerGroup -> addGet('/config', ['controller'=>'Config','action'=>'index']) -> setName('FrontendConfig::index');

$routerGroup -> addGet('/', ['controller'=>'Index','action'=>'index']) -> setName('FrontendIndex::index');

return $routerGroup;
